<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link rel="stylesheet" href="__TEMPLATE__/css/style.css" />
<script type="text/javascript" src="__TEMPLATE__/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="__TEMPLATE__/js/js.js"></script>
<link rel="stylesheet" type="text/css" href="__STATIC__/hdjs/hdjs.css"/>
<script src="__STATIC__/hdjs/hdjs.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
	$(function(){
		//regForm是注册form的id
		$('#regForm').validate({
			//username_reg是input的name名称
			username_reg: {
				//规则
                rule: {
                    required: true,
                    minlen:5,
                    ajax:{url:'{|U:"Member/ajaxCheckUser"}'},
                },
                //违反规则之后
                error: {
                    required: '用户名不能为空',
                    minlen:'用户名最少不得少于5位'
                },
                //验证成功之后
                success: '验证通过',
                //默认的提示
                message: '请输入用户名'
            },
			nickname: {
				//规则
                rule: {
                    required: true,
                },
                //违反规则之后
                error: {
                    required: '昵称不能为空',
                },
                //验证成功之后
                success: '验证通过',
                //默认的提示
                message: '请输入昵称'
            },
            password_reg1: {
				//规则
                rule: {
                    required: true,
                    minlen:6
                },
                //违反规则之后
                error: {
                    required: '密码不能为空',
                    minlen:'密码不得少于6位'
                },
                //验证成功之后
                success: '验证通过',
                //默认的提示
                message: '请输入密码'
            },
            password_reg2: {
				//规则
                rule: {
                    required: true,
                    confirm:'password_reg1'
                },
                //违反规则之后
                error: {
                    required: '密码不能为空',
                    confirm:'两次不一样'
                },
                //验证成功之后
                success: '验证通过',
                //默认的提示
                message: '请再次输入密码'
            },
             code: {
				//规则
                rule: {
                    required: true,
                    ajax:{url:'{|U:"Member/ajaxCheckCode"}'}
                },
                //违反规则之后
                error: {
                    required: '验证码不能为空',
                },
                //验证成功之后
                success: '验证通过',
                //默认的提示
                message: '请输入验证码'
            },
		})
	})
</script>
</head>
<body>
	<!-- 顶部100%灰色区域 -->
	<div id="top_dark_box">
		<!-- 中间1200px宽度区域 -->
		<div id="top_dark">
			<a href=""><img src="__TEMPLATE__/images/others/logo.jpg" id="logo" /></a>
			<!-- 导航菜单 -->
			<ul id="menu">
				<li>
					<a href="__ROOT__/index.html">首页</a>
				</li>
				<navigation>
					<li >
						<a href="{$field.url}">{$field.cname}</a>
					</li>	
				</navigation>
				
			</ul>
			<!-- 导航菜单结束 -->
			<!-- 用户登录 -->
				<div id="loginInfo" class='loginInfo'>
				<if value="!$_SESSION['uid']">		
					<a href="javascript:showLoginBox()" class="top_login">用户登录</a>
					<a href="javascript:showRegBox();">注册</a>
				<else/>
					<span>{$_SESSION['uname']}</span><a href="{|U:'Member/out'}">退出</a> 
				</if>
			</div>
			<!-- 用户登录对应隐藏区域 -->
			<form id="loginForm" action="{|U:'Member/login'}" method="post">
			<div class="login_hide_box">
				<img src="__TEMPLATE__/images/sanjiao.gif" alt="" />
				<div class="middle">
					<p>用户名：</p>
					<input type="text" name="username" class="text" />
					<p>密码：</p>
					<input type="password" name="password" class="text" />
					<input type="submit" value="" class="sub" />
				</div>
				<div class="bottom">
					<a  href="javascript:showRegBox();" class="reg">注册</a>
				</div>
			</div>
			</form>
			
			<!-- 用户注册对应隐藏区域 -->
			<form id="regForm" action="{|U:'Member/register'}" method="post">	
			<div class="reg_hide_box">
				<img src="__TEMPLATE__/images/sanjiao.gif" alt="" />
				<div class="middle">
					<p>用户名：</p>
					<input type="text" name="username_reg" class="text username" />
					<p>昵称：</p>
					<input type="text" name="nickname" class="text nickname" />
					<p>密码：</p>
					<input type="password" name="password_reg1" class="text password" />
					<p>确认密码：</p>
					<input type="password" name="password_reg2" class="text password" />
					<p>验证码：</p>
					<img src="{|U:'Member/code'}" id="code" onclick="this.src=this.src + '&' + Math.random()"/>
					<input type="text"  name="code" class="text password_d" />
					<input type="submit" value="注册" class="sub" />
				</div>
			</div>
			</form>
		</div>
		<!-- 中间1200px宽度区域结束 -->
	</div>
	<!-- 顶部灰色100%区域结束 -->
	
	<!-- 顶部最新消息区域 -->
	<div id="latest_news_box">
		<div id="latest_news">
			<p><span class="title">最新消息：</span>
				<arclist rows="1">
					<a href="{$field.url}">{$field.title}</a>
				</arclist>
			</p>
		</div>
	</div>